package com.qyhl.module_practice.activity.detail.apply;


import com.qyhl.webtv.commonlib.entity.UpTokenBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeAcitivityBean;

import java.util.List;

public class PracticeActApplyPresenter implements PracticeActApplyContract.PracticeActApplyPresenter {
    private PracticeActApplyActivity mView;
    private PracticeActApplyModel mModel;

    PracticeActApplyPresenter(PracticeActApplyActivity mView) {
        this.mView = mView;
        this.mModel = new PracticeActApplyModel(this);
    }


    @Override
    public void getActList(String volId) {
        mModel.getActList(volId);
    }

    @Override
    public void applyScore(String volId, String title, String desc, String actId, String creator, String imgs) {
        mModel.applyScore(volId, title, desc, actId, creator, imgs);
    }

    @Override
    public void setActList(List<PracticeAcitivityBean> beanList) {
         mView.setActList(beanList);
    }

    @Override
    public void actListError(String msg) {
       mView.actListError(msg);
    }

    @Override
    public void applySuccess(String msg) {
        mView.applySuccess(msg);
    }

    @Override
    public void applyError(String msg) {
        mView.applyError(msg);
    }

    @Override
    public void getToken(boolean isUpload) {
        mModel.getToken(isUpload);
    }

    @Override
    public void getTokenSuccess(UpTokenBean data, boolean isUpload) {
        mView.getTokenSuccess(data,isUpload);
    }

    @Override
    public void getTokenError(boolean isUpload) {
        mView.getTokenError(isUpload);
    }
}
